package com.joe;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.context.ConfigurableApplicationContext;


@SpringBootApplication
@EnableDiscoveryClient
public class GulishopCouponApplication {

    public static void main(String[] args) {


    //    SpringApplication.run(GulishopCouponApplication.class, args);
        ConfigurableApplicationContext applicationContext = SpringApplication.run(GulishopCouponApplication.class, args);
        String userName = applicationContext.getEnvironment().getProperty("coupon.user.name");
        String userAge = applicationContext.getEnvironment().getProperty("coupon.user.age");
        System.err.println("user name :"+userName+"; age: "+userAge);
    }

}
